home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 August / MW 8 2003 CD1.iso / Inside Macworld / Product News / gimp-1.2.4.sit / gimp-1.2.4 / devel-docs / libgimp / sgml / gimpgimprc.sgml < prev    next >
Encoding:
Text File  |  2003-05-20  |  5.1 KB  |  135 lines

  1. <refentry id="libgimp-gimpgimprc" revision="19 Jan 2001">
  2. <refmeta>
  3. <refentrytitle>gimpgimprc</refentrytitle>
  4. <manvolnum>3</manvolnum>
  5. <refmiscinfo>LIBGIMP Library</refmiscinfo>
  6. </refmeta>
  7.  
  8. <refnamediv>
  9. <refname>gimpgimprc</refname><refpurpose></refpurpose>
  10. </refnamediv>
  11.  
  12. <refsynopsisdiv><title>Synopsis</title>
  13. <synopsis>
  14.  
  15.  
  16.  
  17. <link linkend="gchar">gchar</link>*      <link linkend="gimp-gimprc-query">gimp_gimprc_query</link>               (<link linkend="gchar">gchar</link> *token);
  18. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-gimprc-set">gimp_gimprc_set</link>                 (<link linkend="gchar">gchar</link> *token,
  19.                                              <link linkend="gchar">gchar</link> *value);
  20. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-get-monitor-resolution">gimp_get_monitor_resolution</link>     (<link linkend="gdouble">gdouble</link> *xres,
  21.                                              <link linkend="gdouble">gdouble</link> *yres);
  22. </synopsis>
  23. </refsynopsisdiv>
  24.  
  25.  
  26.  
  27.  
  28.  
  29. <refsect1>
  30. <title>Description</title>
  31. <para>
  32.  
  33. </para>
  34. </refsect1>
  35.  
  36. <refsect1>
  37. <title>Details</title>
  38. <refsect2>
  39. <title><anchor id="gimp-gimprc-query">gimp_gimprc_query ()</title>
  40. <programlisting><link linkend="gchar">gchar</link>*      gimp_gimprc_query               (<link linkend="gchar">gchar</link> *token);</programlisting>
  41. <para>
  42. Queries the gimprc file parser for information on a specified token.
  43. </para>
  44. <para>
  45. This procedure is used to locate additional information contained in
  46. the gimprc file considered extraneous to the operation of the GIMP.
  47. Plug-ins that need configuration information can expect it will be
  48. stored in the user gimprc file and can use this procedure to
  49. retrieve it. This query procedure will return the value associated
  50. with the specified token. This corresponds _only_ to entries with
  51. the format: (<token> <value>). The value must be a string. Entries
  52. not corresponding to this format will cause warnings to be issued on
  53. gimprc parsing a nd will not be queryable.</para>
  54. <para>
  55.  
  56. </para><informaltable pgwide=1 frame="none" role="params">
  57. <tgroup cols="2">
  58. <colspec colwidth="2*">
  59. <colspec colwidth="8*">
  60. <tbody>
  61. <row><entry align="right"><parameter>token</parameter> :</entry>
  62. <entry> The token to query for.
  63. </entry></row>
  64. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The value associated with the queried token.
  65. </entry></row>
  66. </tbody></tgroup></informaltable></refsect2>
  67. <refsect2>
  68. <title><anchor id="gimp-gimprc-set">gimp_gimprc_set ()</title>
  69. <programlisting><link linkend="gboolean">gboolean</link>    gimp_gimprc_set                 (<link linkend="gchar">gchar</link> *token,
  70.                                              <link linkend="gchar">gchar</link> *value);</programlisting>
  71. <para>
  72. Sets a gimprc token to a value and saves it in the gimprc.
  73. </para>
  74. <para>
  75. This procedure is used to add or change additional information in
  76. the gimprc file that is considered extraneous to the operation of
  77. the GIMP. Plug-ins that need configuration information can use this
  78. function to store it, and gimp_gimprc_query to retrieve it. This
  79. will accept _only_ parameters in the format of (<token> <value>),
  80. where <token> and <value> must be strings. Entries not corresponding
  81. to this format will be eaten and no action will be performed. If the
  82. gimprc can not be written for whatever reason, gimp will complain
  83. loudly and the old gimprc will be saved in gimprc.old.</para>
  84. <para>
  85.  
  86. </para><informaltable pgwide=1 frame="none" role="params">
  87. <tgroup cols="2">
  88. <colspec colwidth="2*">
  89. <colspec colwidth="8*">
  90. <tbody>
  91. <row><entry align="right"><parameter>token</parameter> :</entry>
  92. <entry> The token to modify.
  93. </entry></row>
  94. <row><entry align="right"><parameter>value</parameter> :</entry>
  95. <entry> The value to set the token to.
  96. </entry></row>
  97. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  98. </entry></row>
  99. </tbody></tgroup></informaltable></refsect2>
  100. <refsect2>
  101. <title><anchor id="gimp-get-monitor-resolution">gimp_get_monitor_resolution ()</title>
  102. <programlisting><link linkend="gboolean">gboolean</link>    gimp_get_monitor_resolution     (<link linkend="gdouble">gdouble</link> *xres,
  103.                                              <link linkend="gdouble">gdouble</link> *yres);</programlisting>
  104. <para>
  105. Get the monitor resolution as specified in the Preferences.
  106. </para>
  107. <para>
  108. Returns the resolution of the monitor in pixels/inch. This value is
  109. taken from the Preferences (or the X-Server if this is set in the
  110. Preferences) and there's no guarantee for the value to be
  111. reasonable.</para>
  112. <para>
  113.  
  114. </para><informaltable pgwide=1 frame="none" role="params">
  115. <tgroup cols="2">
  116. <colspec colwidth="2*">
  117. <colspec colwidth="8*">
  118. <tbody>
  119. <row><entry align="right"><parameter>xres</parameter> :</entry>
  120. <entry> X resolution.
  121. </entry></row>
  122. <row><entry align="right"><parameter>yres</parameter> :</entry>
  123. <entry> Y resolution.
  124. </entry></row>
  125. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  126. </entry></row>
  127. </tbody></tgroup></informaltable></refsect2>
  128.  
  129. </refsect1>
  130.  
  131.  
  132.  
  133.  
  134. </refentry>
  135.